Optimal. Leaf size=85 \[ -\frac {\sec (c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec ^5(c+d x)}{a^2 d}+\frac {2 \sec ^7(c+d x)}{7 a^2 d}-\frac {2 \tan ^7(c+d x)}{7 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2954, 2952,
2686, 276, 2687, 30, 200} \begin {gather*} -\frac {2 \tan ^7(c+d x)}{7 a^2 d}+\frac {2 \sec ^7(c+d x)}{7 a^2 d}-\frac {\sec ^5(c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec (c+d x)}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 200
Rule 276
Rule 2686
Rule 2687
Rule 2952
Rule 2954
Rubi steps
\begin {align*} \int \frac {\sin (c+d x) \tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \sec ^3(c+d x) (a-a \sin (c+d x))^2 \tan ^5(c+d x) \, dx}{a^4}\\ &=\frac {\int \left (a^2 \sec ^3(c+d x) \tan ^5(c+d x)-2 a^2 \sec ^2(c+d x) \tan ^6(c+d x)+a^2 \sec (c+d x) \tan ^7(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \sec ^3(c+d x) \tan ^5(c+d x) \, dx}{a^2}+\frac {\int \sec (c+d x) \tan ^7(c+d x) \, dx}{a^2}-\frac {2 \int \sec ^2(c+d x) \tan ^6(c+d x) \, dx}{a^2}\\ &=\frac {\text {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^2 d}+\frac {\text {Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\sec (c+d x)\right )}{a^2 d}-\frac {2 \text {Subst}\left (\int x^6 \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=-\frac {2 \tan ^7(c+d x)}{7 a^2 d}+\frac {\text {Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}+\frac {\text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac {\sec (c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec ^5(c+d x)}{a^2 d}+\frac {2 \sec ^7(c+d x)}{7 a^2 d}-\frac {2 \tan ^7(c+d x)}{7 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 126, normalized size = 1.48 \begin {gather*} -\frac {\sec ^3(c+d x) (42-182 \cos (c+d x)+104 \cos (2 (c+d x))-39 \cos (3 (c+d x))-18 \cos (4 (c+d x))+13 \cos (5 (c+d x))+28 \sin (c+d x)-104 \sin (2 (c+d x))+66 \sin (3 (c+d x))-52 \sin (4 (c+d x))+6 \sin (5 (c+d x)))}{336 a^2 d (1+\sin (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 145, normalized size = 1.71
method | result | size |
risch | \(-\frac {2 \left (42 i {\mathrm e}^{8 i \left (d x +c \right )}+21 \,{\mathrm e}^{9 i \left (d x +c \right )}+56 i {\mathrm e}^{6 i \left (d x +c \right )}-28 \,{\mathrm e}^{7 i \left (d x +c \right )}+28 i {\mathrm e}^{4 i \left (d x +c \right )}-42 \,{\mathrm e}^{5 i \left (d x +c \right )}-24 i {\mathrm e}^{2 i \left (d x +c \right )}-76 \,{\mathrm e}^{3 i \left (d x +c \right )}-6 i-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{21 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{7} d \,a^{2}}\) | \(143\) |
derivativedivides | \(\frac {-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {64}{256 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-256}+\frac {4}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{a^{2} d}\) | \(145\) |
default | \(\frac {-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {64}{256 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-256}+\frac {4}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{a^{2} d}\) | \(145\) |
norman | \(\frac {-\frac {32 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {16}{21 a d}+\frac {64 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{21 a d}+\frac {64 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}-\frac {64 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}-\frac {176 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}-\frac {128 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}}{a \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}\) | \(167\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 296 vs.
\(2 (79) = 158\).
time = 0.31, size = 296, normalized size = 3.48 \begin {gather*} -\frac {16 \, {\left (\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {8 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + 1\right )}}{21 \, {\left (a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {8 \, a^{2} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {14 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {8 \, a^{2} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {3 \, a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {a^{2} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 104, normalized size = 1.22 \begin {gather*} -\frac {9 \, \cos \left (d x + c\right )^{4} - 22 \, \cos \left (d x + c\right )^{2} - 2 \, {\left (3 \, \cos \left (d x + c\right )^{4} + 6 \, \cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) + 5}{21 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} - 2 \, a^{2} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.77, size = 146, normalized size = 1.72 \begin {gather*} \frac {\frac {7 \, {\left (6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {42 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 315 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1015 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1750 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1344 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 511 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 79}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{168 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.37, size = 160, normalized size = 1.88 \begin {gather*} -\frac {\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{21}+\frac {64\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{7}-\frac {128\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{21}-\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}}{a^2\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________